package com.thinkgsp.jxc.service;

import com.thinkgsp.jxc.model.RpArpBill;
import com.thinkgsp.jxc.model.RpPayBill;
import com.thinkgsp.jxc.model.RpRecBill;

/**
 * 应收应付模块基础服务接口
 * @author evan
 *
 */
public interface RpService extends GeneralService {
	/**
	 * 保存收款单据
	 * @param bill
	 * @throws ServiceException
	 */
	public void saveRecBill(RpRecBill bill) throws ServiceException;
	
	/**
	 * 保存付款单据
	 * @param bill
	 * @throws ServiceException
	 */
	public void savePayBill(RpPayBill bill) throws ServiceException;
	
	/**
	 * 删除收款单据
	 * @param billId
	 * @throws ServiceException
	 */
	public void deleteRecBill(Long billId) throws ServiceException;
	
	/**
	 * 删除付款单据
	 * @param billId
	 * @throws ServiceException
	 */
	public void deletePayBill(Long billId) throws ServiceException;
	
	/**
	 * 收款单据归档
	 * @param billId
	 * @throws ServiceException
	 */
	public void archiveRecBill(Long billId) throws ServiceException;
	
	/**
	 * 收款单据反归档
	 * @param billId
	 * @throws ServiceException
	 */
	public void unArchiveRecBill(Long billId) throws ServiceException;
	
	/**
	 * 付款单据归档
	 * @param billId
	 * @throws ServiceException
	 */
	public void archivePayBill(Long billId) throws ServiceException;
	
	/**
	 * 付款单据反归档
	 * @param billId
	 * @throws ServiceException
	 */
	public void unArchivePayBill(Long billId) throws ServiceException;
	
	/**
	 * 保存应收应付单
	 * @param bill
	 */
	public void saveArpBill(RpArpBill bill) throws ServiceException;
	
	/**
	 * 删除应收应付单
	 * @param id
	 */
	public void deleteArpBill(Long id) throws ServiceException;
	
	/**
	 * 应收单归档
	 * @param billId
	 */
	public void archiveARecBill(Long billId) throws ServiceException;
	
	/**
	 * 应付单归档
	 * @param billId
	 */
	public void archiveAPayBill(Long billId) throws ServiceException;
	
	/**
	 * 应收单反归档
	 * @param billId
	 */
	public void unArchiveARecBill(Long billId) throws ServiceException;
	
	/**
	 * 应付单反归档
	 * @param billId
	 */
	public void unArchiveAPayBill(Long billId) throws ServiceException;
	
	/**
	 * 获取应收应付单是否已经核销
	 * @param billId
	 * @return
	 */
	public boolean isArpBillCheck(Long billId);
	
	/**
	 * 获取收款付款单是否已经核销
	 * @param billId
	 * @return
	 */
	public boolean isRpBillCheck(Long billId);
	
	/**
	 * 获取业务单据对应的单据编码
	 * @param clazz
	 * @return
	 */
	public String newNumber(@SuppressWarnings("rawtypes") Class clazz) throws ServiceException;

}
